package com.ymatou.query.trading.api.testcase;

import java.util.ArrayList;

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.experimental.categories.Category;

import com.ymatou.query.trading.api.parameter.GetSendCouponCountOfCouponBatchCodeBean;
import com.ymatou.query.trading.api.service.GetSendCouponCountOfCouponBatchCodeCall;
import com.ymt.core.tool.Logger;
import com.ymt.utils.annotation.TestCase;
import com.ymt.utils.annotation.TestSuite;
import com.ymt.utils.tag.P1;
import com.ymttest.utils.constant.ECode;

/**
 * 获取指定用户的指定优惠券批次的领用数量 FreeMaker Template自动生成代码
 */
@TestSuite
public class Ts_GetSendCouponCountOfCouponBatchCode {

	private static GetSendCouponCountOfCouponBatchCodeBean getsendcouponcountofcouponbatchcodebean;
	private static GetSendCouponCountOfCouponBatchCodeCall getsendcouponcountofcouponbatchcodecall;

	@BeforeClass
	public static void setUp() {
		Logger.createResultFile("获取指定用户的指定优惠券批次的领用数量");
	}

	@Before
	public void caseUp() {

		getsendcouponcountofcouponbatchcodebean = new GetSendCouponCountOfCouponBatchCodeBean();
		getsendcouponcountofcouponbatchcodecall = new GetSendCouponCountOfCouponBatchCodeCall();
	}

	@AfterClass
	public static void tearDown() {
		Logger.generateResult(getsendcouponcountofcouponbatchcodecall.getOpurl());
	}

	@After
	public void caseDown() {
		Logger.end();
	}

	//@Test 废弃
	@Category(P1.class)
	@TestCase
	public void Tc_GetSendCouponCountOfCouponBatchCode_001() {
		Logger.start(true,"获取指定用户的指定优惠券批次的领用数量成功");
		try {
			// 参数
			ArrayList<String> list = new ArrayList<String>();
			list.add("1571424178");
			list.add("1571424179");
			getsendcouponcountofcouponbatchcodebean.setBatchCodeList(list);
			getsendcouponcountofcouponbatchcodebean.setBuyerId(1113);
			// 发送请求
			getsendcouponcountofcouponbatchcodecall.setData(getsendcouponcountofcouponbatchcodebean);
			getsendcouponcountofcouponbatchcodecall.callService();
			Logger.comment("getsendcouponcountofcouponbatchcodecall send:"
					+ getsendcouponcountofcouponbatchcodecall.getEntityString());
			Logger.comment("getsendcouponcountofcouponbatchcodecall response:"
					+ getsendcouponcountofcouponbatchcodecall.getReturnData());
			Logger.verifyEquals(ECode.SUCCESS, getsendcouponcountofcouponbatchcodecall.getCode(), "验证Code");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	
}